<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>推荐</title>
    <link href="/before/css/common.css" rel="stylesheet" tyle="text/css" />
    <link href="/before/css/style.css" rel="stylesheet" type="text/css" />
    <script src="/before/js/jquery.min.1.8.2.js" type="text/javascript"></script>
    <script src="/before/js/common_js.js" type="text/javascript"></script>
    <script src="/before/js/jquery.SuperSlide.2.1.1.js" type="text/javascript"></script>
    <script src="/after/js/vue/vue.min.js" type="text/javascript"></script>
</head>
<body>
<div id="app">
    <div class="index_style clearfix">
    <!--推荐图层样式-->
    <div class="recommend">
        <div class="recommend_bg"></div>
        <div class="list">
            <div class="picScroll">
                <div class="hd">
                    <a class="prev" href="javascript:void(0)">&gt;</a>
                    <a class="next" href="javascript:void(0)">&lt;</a>
                </div>
                <div class="bd">
                    <ul>
                        <li v-for="book in bookList" class="recommend_info" style="float:left">
                            <a class="img_link" :href="'LQ_details.ftl?id='+book.id" target="_blank"><img :src="'/uploads/'+book.picture" height="130px"/></a>
                            <div class="content">
                                <a class="title_name" :href="'LQ_details.ftl?id='+book.id"><<{{book.name}}>></a>
                                <h2><i>￥</i>{{book.price}}</h2>
                            </div>
                            <a class="buy_btn"> 立即购买</a>
                        </li>
                    </ul>
                </div>
            </div>
            <script>jQuery(".picScroll").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"leftLoop",autoPlay:true,vis:4});</script>
        </div>
    </div>
    </div>
</div>

</body>
<script>
    var app = new Vue({
        el:'#app',
        data:{
            bookList:[]
        }
    })

    $(function(){
        $.ajax({
            type:"POST",
            dataType:"json",
            url:"/main/recommend.do",
            success:function(msg){
                app.bookList = msg.bookList;
            },error:function(){
                alert("显示错误！");
            }
        })
    })
</script>
</html>